package cn.xianyang.pet.domain;

import cn.xianyang.basic.domain.BaseDomain;
import cn.xianyang.org.domain.Department;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author xianyang
 * @since 2022-06-25
 */
@Data
public class PetType extends BaseDomain{

    private static final long serialVersionUID = 1L;

    private String name;
    private String description;
    /**
     * 父类型id
     */
    private Long pid;

    //子部门树字段(一对多)。用来装当前宠物下的所有二级宠物
    @JsonInclude(JsonInclude.Include.NON_EMPTY)//最后一级如果为空就不显示
    private List<PetType> children = new ArrayList<>();

}
